package cn.edu.scau.cmi.lvmingyan.abstractFactory.factory;

import cn.edu.scau.cmi.lvmingyan.abstractFactory.domain.Meat;
import cn.edu.scau.cmi.lvmingyan.abstractFactory.domain.TianbangBeef;
import cn.edu.scau.cmi.lvmingyan.abstractFactory.domain.TianbangChicken;
import cn.edu.scau.cmi.lvmingyan.abstractFactory.domain.TianbangPork;

public class TianbangFactory extends AbstractFactory {
	public TianbangFactory(){
	}
	
	public Meat create(String name){
		brand="Tianbang";
		switch(name) {
		case "Pork":return createPork();
		case "Beef":return createBeef();
		case "Chicken":return createChicken();
		default:return null;
		}
	}
	public Meat createPork() {
		return new TianbangPork();
	}

	@Override
	public Meat createBeef() {
		return new TianbangBeef();
	}

	@Override
	public Meat createChicken() {
		return new TianbangChicken();
	}
}
